<script setup lang='ts'>
import AddCustomer from './components/AddCustomer.vue'

const addVisible = ref(false)
const tabName = ref('1')
const data = [
  {
    sign: '百度',
    name: '百度-华东',
    concat: '李彦宏',
    phone: '19912345678',
    date: '2024-7-8 12:06:45',
    role: '运营',
  },
  {
    sign: '百度',
    name: '百度-华东1',
    concat: '李彦宏1',
    phone: '199123456728',
    date: '2024-7-8 12:06:45',
    role: '运营',
  },
  // {
  //   sign: '百度',
  //   name: '百度-华东',
  //   concat: '李彦宏',
  //   phone: '19912345678',
  //   date: '2024-7-8 12:06:45',
  //   role: '运营',
  // },
]

function objectSpanMethod({
  row,
  column,
  rowIndex,
  columnIndex,
}) {
  if (columnIndex === 0) {
    if (rowIndex % 2 === 0) {
      return {
        rowspan: 2,
        colspan: 1,
      }
    }
    else {
      return {
        rowspan: 0,
        colspan: 0,
      }
    }
  }
}
</script>

<template>
  <div bg-white p2>
    <BaseTable :data="data" style="width: 100%" :span-method="objectSpanMethod">
      <el-table-column label="商标名称" prop="sign" />
      <el-table-column label="客户主体名称" prop="name" />
      <el-table-column label="关联流程" />
      <el-table-column label="联系人" prop="concat" />
      <el-table-column label="角色" prop="role" />
      <el-table-column label="联系方式" prop="phone" />
      <el-table-column label="添加时间" prop="date" />
    </BaseTable>
    <!-- <el-tabs v-model="tabName" type="border-card" tab-position="top">
      <el-tab-pane
        label="对接客户"
      >

      </el-tab-pane>
      <el-tab-pane
        label="交付客户"
      >
        <BaseTable :data="data" style="width: 100%">
          <el-table-column label="客户联系人" prop="concat" />
          <el-table-column label="客户角色" prop="role" />
          <el-table-column label="联系方式" prop="phone" />
          <el-table-column label="添加时间" prop="date" />
        </BaseTable>
      </el-tab-pane>
    </el-tabs> -->
    <AddCustomer v-model="addVisible" />
  </div>
</template>

<style scoped lang='scss'>

</style>
